/*
* Conditions Of Use
*
* This software was developed by employees of the Sigmatrix(Beijing) Corporation.
* This software is provided by sigmatrix as a service and is expressly
* provided "AS IS."  Sigmatrix MAKES NO WARRANTY OF ANY KIND, EXPRESS, IMPLIED
* OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT
* AND DATA ACCURACY.  Sigmatrix does not warrant or make any representations
* regarding the use of the software or the results thereof, including but
* not limited to the correctness, accuracy, reliability or usefulness of
* the software.
*
* Permission to use this software is contingent upon your acceptance
* of the terms of this agreement.
*
*/
package com.sigmatrix.h5.response;

import java.io.Serializable;

import com.sigmatrix.h5.enums.ResponseEnum;

import io.swagger.annotations.ApiModelProperty;

/**
 *@ClassName: Response
 *@Description: 响应信息
 *@author youjun
 *@date 2017年6月22日 下午6:54:04
 */
//@ApiModel(value="响应信息")
public class Response implements Serializable {

	/**
	 *@Fields serialVersionUID : TODO()
	 */
	private static final long serialVersionUID = 2330229042231810964L;

	/**响应码,eg:1000*/
	@ApiModelProperty(value="响应码")
	private Integer code;
	
	/**响应消息,eg:成功*/
	@ApiModelProperty(value="响应信息")
	private String message;
	
	/**响应数据*/
	@ApiModelProperty(value="响应数据")
	private Object data;

	/**
	 *@Title: Response
	 *@Description: TODO
	 */
	public Response() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 *@Title: Response
	 *@Description: TODO
	 *@param code
	 *@param message
	 */
	public Response(ResponseEnum responseEnum) {
		super();
		this.code = responseEnum.getCode();
		this.message = responseEnum.getMessage();
	}

	
	/**
	 *@Title: Response
	 *@Description: TODO
	 *@param code
	 *@param message
	 */
	public Response(Integer code, String message) {
		super();
		this.code = code;
		this.message = message;
	}

	/**
	 *@Title: Response
	 *@Description: TODO
	 *@param code
	 *@param message
	 *@param data
	 */
	public Response(Integer code, String message, Object data) {
		super();
		this.code = code;
		this.message = message;
		this.data = data;
	}

	/**
	 *@Title: Response
	 *@Description: TODO
	 *@param code
	 *@param message
	 *@param data
	 */
	public Response(ResponseEnum responseEnum, Object data) {
		super();
		this.code = responseEnum.getCode();
		this.message = responseEnum.getMessage();
		this.data = data;
	}

	/**
	 *@return the code
	 */
	public Integer getCode() {
		return code;
	}

	/**
	 *@param code the code to set
	 */
	public void setCode(Integer code) {
		this.code = code;
	}

	/**
	 *@return the message
	 */
	public String getMessage() {
		return message;
	}

	/**
	 *@param message the message to set
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 *@return the data
	 */
	public Object getData() {
		return data;
	}

	/**
	 *@param data the data to set
	 */
	public void setData(Object data) {
		this.data = data;
	}
	
}
